import MenuConfig from '@/router/menu'
export default props => {
    let flag = true
    let id = props.id
    let childId = props.subid           
    id = id - 0            
    const parent = MenuConfig.find(item => item.tid === id && !item.hide)
    if (!parent) {
        flag = false
    } else {
        const { sub } = parent
        if (childId && Array.isArray(sub)) {
            childId = childId - 0
            const matchIndex = sub.findIndex(item => item.tid === childId && !item.hide)
            flag = matchIndex > -1
        }
    }        
    return flag
}